/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author wyr
 */
@Entity
@Table(name = "t_service_use")
//@NamedQueries({@NamedQuery(name = "TServiceUse.findAll", query = "SELECT t FROM TServiceUse t"), @NamedQuery(name = "TServiceUse.findById", query = "SELECT t FROM TServiceUse t WHERE t.id = :id"), @NamedQuery(name = "TServiceUse.findByContentid", query = "SELECT t FROM TServiceUse t WHERE t.contentid = :contentid"), @NamedQuery(name = "TServiceUse.findByPhonenum", query = "SELECT t FROM TServiceUse t WHERE t.phonenum = :phonenum"), @NamedQuery(name = "TServiceUse.findBySourceid", query = "SELECT t FROM TServiceUse t WHERE t.sourceid = :sourceid"), @NamedQuery(name = "TServiceUse.findByCandownloadnum", query = "SELECT t FROM TServiceUse t WHERE t.candownloadnum = :candownloadnum"), @NamedQuery(name = "TServiceUse.findByRealdownloadnum", query = "SELECT t FROM TServiceUse t WHERE t.realdownloadnum = :realdownloadnum"), @NamedQuery(name = "TServiceUse.findByDownloadonlycode", query = "SELECT t FROM TServiceUse t WHERE t.downloadonlycode = :downloadonlycode"), @NamedQuery(name = "TServiceUse.findByOrdertime", query = "SELECT t FROM TServiceUse t WHERE t.ordertime = :ordertime"), @NamedQuery(name = "TServiceUse.findByPreloadcode", query = "SELECT t FROM TServiceUse t WHERE t.preloadcode = :preloadcode")})
public class TServiceUse implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Column(name = "contentid")
    private BigInteger contentid;
    @Column(name = "phonenum")
    private String phonenum;
    @Column(name = "sourceid")
    private BigInteger sourceid;
    @Column(name = "candownloadnum")
    private BigInteger candownloadnum;
    @Column(name = "realdownloadnum")
    private BigInteger realdownloadnum;
    @Column(name = "downloadonlycode")
    private String downloadonlycode;
    @Basic(optional = false)
    @Column(name = "ordertime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date ordertime;
    @Column(name = "preloadcode")
    private String preloadcode;

    public TServiceUse() {
    }

    public TServiceUse(Integer id) {
        this.id = id;
    }

    public TServiceUse(Integer id, Date ordertime) {
        this.id = id;
        this.ordertime = ordertime;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public BigInteger getContentid() {
        return contentid;
    }

    public void setContentid(BigInteger contentid) {
        this.contentid = contentid;
    }

    public String getPhonenum() {
        return phonenum;
    }

    public void setPhonenum(String phonenum) {
        this.phonenum = phonenum;
    }

    public BigInteger getSourceid() {
        return sourceid;
    }

    public void setSourceid(BigInteger sourceid) {
        this.sourceid = sourceid;
    }

    public BigInteger getCandownloadnum() {
        return candownloadnum;
    }

    public void setCandownloadnum(BigInteger candownloadnum) {
        this.candownloadnum = candownloadnum;
    }

    public BigInteger getRealdownloadnum() {
        return realdownloadnum;
    }

    public void setRealdownloadnum(BigInteger realdownloadnum) {
        this.realdownloadnum = realdownloadnum;
    }

    public String getDownloadonlycode() {
        return downloadonlycode;
    }

    public void setDownloadonlycode(String downloadonlycode) {
        this.downloadonlycode = downloadonlycode;
    }

    public Date getOrdertime() {
        return ordertime;
    }

    public void setOrdertime(Date ordertime) {
        this.ordertime = ordertime;
    }

    public String getPreloadcode() {
        return preloadcode;
    }

    public void setPreloadcode(String preloadcode) {
        this.preloadcode = preloadcode;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TServiceUse)) {
            return false;
        }
        TServiceUse other = (TServiceUse) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.TServiceUse[id=" + id + "]";
    }

}
